<?php
/**
 * The world of warcraft armory library was created by Marc Binder. The called
 * product will be deployed by Tof Technologies, Germany. All sources contain to 
 * the New BSD Licence. Self created extensions can be contained in the hall of 
 * fame. So the community has the chance to get a overview of all parsers and
 * handlers, which are really effective.
 * 
 * Get more informations:
 * http://code.google.com/p/warcraftarmory/
 * 
 * @author      Marc Binder <marcandrebinder@gmail.com>
 * @copyright   (c) Tof Technologies, Germany - 2010
 * @license     New BSD Licence
 * @package     Wow_Armory
 * @version     $Id$
 */

/**
 * Wow_Armory_Handler_Element_Default_Arena_Team
 * 
 * @category    Wow_Armory
 * @package     Handler
 * @subpackage  Element Default Spec Arena Team
 * @example     n/A
 */
class Wow_Armory_Handler_Element_Default_Arena_Team
    extends Wow_Armory_Core_Element_Abstract
{
    
    /**
     * Creates a new arena team.
     * 
     * @param  array $results
     * @param  Wow_Armory_Handler_Element_Default_Arena_Team_Emblem $emblem
     * @param  array $members
     * @return void
     */
    public function __construct(Array $results, 
        Wow_Armory_Handler_Element_Default_Arena_Team_Emblem $emblem,
        Array $members)
    {
        $this->_toResults($results);
        $this->_results['emblem'] = $emblem;
        
        $characters = $members['character'];
        if (is_array($characters)) {
            foreach ($characters as $character) {
                $data = $character->toArray();
                $data = $data['@attributes'];
                $this->_results['members'][] = 
                    new Wow_Armory_Handler_Element_Default_Arena_Team_Member(
                        $data
                    );
            }
        }
        
    }
    
    /**
     * Gets the battle group.
     * 
     * @return string
     */
    public function getBattleGroup()
    {
        return $this->battleGroup;
    }
    
    /**
     * Gets the created string.
     * 
     * @return string
     */
    public function getCreated()
    {
        return $this->created;
    }
    
    /**
     * Gets the faction.
     * 
     * @return string
     */
    public function getFaction()
    {
        return $this->faction;
    }
    
    /**
     * Gets the faction id.
     * 
     * @return string
     */
    public function getFactionId()
    {
        return $this->factionId;
    }
    
    /**
     * Gets the played games.
     * 
     * @return string
     */
    public function getGamesPlayed()
    {
        return $this->gamesPlayed;
    }
    
    /**
     * Gets the won games.
     * 
     * @return string
     */
    public function getGamesWon()
    {
        return $this->gamesWon;
    }
    
    /**
     * Gets the last season ranking.
     * 
     * @return string
     */
    public function getLastSeasonRanking()
    {
        return $this->lastSeasonRanking;
    }
    
    /**
     * Gets the name.
     * 
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    
    /**
     * Gets the ranking.
     * 
     * @return string
     */
    public function getRanking()
    {
        return $this->gamesranking;
    }
    
    /**
     * Gets the rating.
     * 
     * @return string
     */
    public function getRating()
    {
        return $this->rating;
    }
    
    /**
     * Gets the realm.
     * 
     * @return string
     */
    public function getRealm()
    {
        return $this->realm;
    }
    
    /**
     * Gets the realm url.
     * 
     * @return string
     */
    public function getRealmUrl()
    {
        return $this->realmUrl;
    }
    
    /**
     * Gets the season.
     * 
     * @return string
     */
    public function getSeason()
    {
        return $this->season;
    }
    
    /**
     * Gets the played games in this season.
     * 
     * @return string
     */
    public function getSeasonGamesPlayed()
    {
        return $this->seasonGamesPlayed;
    }
    
    /**
     * Gets the won games in this season.
     * 
     * @return string
     */
    public function getSeasonGamesWon()
    {
        return $this->seasonGamesWon;
    }
    
    /**
     * Gets the size.
     * 
     * @return string
     */
    public function getSize()
    {
        return $this->size;
    }
    
    /**
     * Gets the team size.
     * 
     * @return string
     */
    public function getTeamSize()
    {
        return $this->teamSize;
    }
    
    /**
     * Gets the team url.
     * 
     * @return string
     */
    public function getTeamUrl()
    {
        return $this->teamUrl;
    }
    
    /**
     * Gets the url.
     * 
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }
    
    /**
     * Get the members.
     * 
     * @return array
     */
    public function getMembers()
    {
        return $this->members;
    }
    
    /**
     * Gets the emblem.
     * 
     * @return Wow_Armory_Handler_Element_Default_Arena_Team_Emblem
     */
    public function getEmblem()
    {
        return $this->emblem;
    }
    
}